
package com.ami.kvm.jviewer.gui;

import com.ami.kvm.jviewer.Debug;
import com.ami.kvm.jviewer.JViewer;
import com.ami.kvm.jviewer.common.ISOCApp;
import com.ami.kvm.jviewer.common.oem.IOEMJVMenu;
import com.ami.kvm.jviewer.common.oem.IOEMManager;
import com.ami.kvm.jviewer.hid.USBMouseRep;
import com.ami.kvm.jviewer.kvmpkts.KVMClient;
import java.awt.Component;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Image;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.net.URL;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JSlider;
import javax.swing.KeyStroke;

public abstract class JVMenu {
	public static boolean INITIAL_MENU_STATUS = true;

	public static final String VIDEO = "Video";

	public static final String VIDEO_PAUSE_REDIRECTION = "VideoPauseRedirection";

	public static final String VIDEO_RESUME_REDIRECTION = "VideoResumeRedirection";

	public static final String VIDEO_REFRESH = "VideoRefresh";

	public static final String VIDEO_CAPTURE_SCREEN = "VideoCaptureScreen";

	public static final String VIDEO_HOST_DISPLAY_UNLOCK = "VideoHostDisplayUnlock";

	public static final String VIDEO_HOST_DISPLAY_LOCK = "VideoHostDisplayLock";

	public static final String VIDEO_FULL_SCREEN = "VideoFullScreen";

	public static final String VIDEO_EXIT = "VideoExit";

	public static final String KEYBOARD = "Keyboard";

	public static final String KEYBOARD_RIGHT_CTRL_KEY = "KeyboardHoldRightCtrlKey";

	public static final String KEYBOARD_RIGHT_ALT_KEY = "KeyboardHoldRightAltKey";

	public static final String KEYBOARD_LEFT_CTRL_KEY = "KeyboardHoldLeftCtrlKey";

	public static final String KEYBOARD_LEFT_ALT_KEY = "KeyboardHoldLeftAltKey";

	public static final String KEYBOARD_LEFT_WINKEY_PRESSHOLD = "KeyboardLeftWindowsKeyHoldDown";

	public static final String KEYBOARD_LEFT_WINKEY_PRESSRELEASE = "KeyboardLeftWindowsKeyPressRelease";
	public static final String KEYBOARD_RIGHT_WINKEY_PRESSHOLD = "KeyboardRightWindowsKeyHoldDown";
	public static final String KEYBOARD_RIGHT_WINKEY_PRESSRELEASE = "KeyboardRightWindowsKeyPressRelease";
	public static final String KEYBOARD_CTRL_ALT_DEL = "KeyboardCtrlAltDel";
	public static final String KEYBOARD_CONTEXT_MENU = "KeyboardContextMenu";
	public static final String KEYBOARD_HOTKEYS = "Hotkeys";
	public static final String KEYBOARD_ADD_HOTKEYS = "Add Hotkeys";
	public static final String KEYBOARD_FULL_KEYBOARD = "Full Keyborad Support";
	public static final String LINUX_HOST = "Linux host";
	public static final String WINDOWS_HOST = "Windows host";
	public static final String AUTOMATIC_LANGUAGE = "Auto detect";
	public static final String KEYBOARD_LAYOUT = "Keyboard Layout";
	public static final String PHYSICAL_KEYBOARD = "PhysicalKeyboard";
	public static final String PKBRD_LANGUAGE_ENGLISH_US = "US";
	public static final String PKBRD_LANGUAGE_ENGLISH_UK = "GB";
	public static final String PKBRD_LANGUAGE_FRENCH_FRANCE = "FR";
	public static final String PKBRD_LANGUAGE_FRENCH_BELGIUM = "FR-BE";
	public static final String PKBRD_LANGUAGE_GERMAN_GER = "DE";
	public static final String PKBRD_LANGUAGE_GERMAN_SWISS = "DE-CH";
	public static final String PKBRD_LANGUAGE_JAPANESE = "JP";
	public static final String PKBRD_LANGUAGE_SPANISH = "ES";
	public static final String PKBRD_LANGUAGE_ITALIAN = "IT";
	public static final String PKBRD_LANGUAGE_DANISH = "DA";
	public static final String PKBRD_LANGUAGE_FINNISH = "FI";
	public static final String PKBRD_LANGUAGE_NORWEGIAN = "NO";
	public static final String PKBRD_LANGUAGE_PORTUGUESE = "PT";
	public static final String PKBRD_LANGUAGE_SWEDISH = "SV";
	public static final String PKBRD_LANGUAGE_DUTCH_NL = "NL-NL";
	public static final String PKBRD_LANGUAGE_DUTCH_BE = "NL-BE";
	public static final String PKBRD_LANGUAGE_TURKISH_F = "TR_F";
	public static final String PKBRD_LANGUAGE_TURKISH_Q = "TR_Q";
	public static final String PKBRD_NONE = "NONE";
	public static final String SOFTKEYBOARD = "SoftKeyboard";
	public static final String SKBRD_LANGUAGE = "SKBD_";
	public static final String SKBRD_LANGUAGE_ENGLISH_US = "SKBD_English(United States)";
	public static final String SKBRD_LANGUAGE_ENGLISH_UK = "SKBD_English(United Kingdom)";
	public static final String SKBRD_LANGUAGE_SPANISH = "SKBD_Spanish";
	public static final String SKBRD_LANGUAGE_FRENCH = "SKBD_French";
	public static final String SKBRD_LANGUAGE_GERMAN_GER = "SKBD_German(Germany)";
	public static final String SKBRD_LANGUAGE_ITALIAN = "SKBD_Italian";
	public static final String SKBRD_LANGUAGE_DANISH = "SKBD_Danish";
	public static final String SKBRD_LANGUAGE_FINNISH = "SKBD_Finnish";
	public static final String SKBRD_LANGUAGE_GERMAN_SWITZ = "SKBD_German(Switzerland)";
	public static final String SKBRD_LANGUAGE_NORWEGIAN_NOR = "SKBD_Norwegian(Norway)";
	public static final String SKBRD_LANGUAGE_PORTUGUESE = "SKBD_Portuguese(Portugal)";
	public static final String SKBRD_LANGUAGE_SWEDISH = "SKBD_Swedish";
	public static final String SKBRD_LANGUAGE_HEBREW = "SKBD_Hebrew";
	public static final String SKBRD_LANGUAGE_FRENCH_BELGIUM = "SKBD_French(Belgium)";
	public static final String SKBRD_LANGUAGE_DUTCH_BELGIUM = "SKBD_Dutch(Belgium)";
	public static final String SKBRD_LANGUAGE_DUTCH_NL = "SKBD_Dutch(Netherlands)";
	public static final String SKBRD_LANGUAGE_RUSSIAN = "SKBD_Russian";
	public static final String SKBRD_LANGUAGE_JAPANESE_Q = "SKBD_Japanese - Q";
	public static final String SKBRD_LANGUAGE_JAPANESE_H = "SKBD_Japanese Hiragana";
	public static final String SKBRD_LANGUAGE_JAPANESE_K = "SKBD_Japanese Katakana";
	public static final String SKBRD_LANGUAGE_TURKISH_F = "SKBD_Turkish - F";
	public static final String SKBRD_LANGUAGE_TURKISH_Q = "SKBD_Turkish - Q";
	public static final int LANGUAGE_ENGLISH_US = 0;
	public static final int LANGUAGE_ENGLISH_UK = 1;
	public static final int LANGUAGE_SPANISH = 2;
	public static final int LANGUAGE_FRENCH = 3;
	public static final int LANGUAGE_GERMAN_GER = 4;
	public static final int LANGUAGE_ITALIAN = 5;
	public static final int LANGUAGE_DANISH = 6;
	public static final int LANGUAGE_FINNISH = 7;
	public static final int LANGUAGE_GERMAN_SWISS = 8;
	public static final int LANGUAGE_NORWEGIAN_NOR = 9;
	public static final int LANGUAGE_PORTUGUESE = 10;
	public static final int LANGUAGE_SWEDISH = 11;
	public static final int LANGUAGE_HEBREW = 12;
	public static final int LANGUAGE_FRENCH_BELGIUM = 13;
	public static final int LANGUAGE_DUTCH_BELGIUM = 14;
	public static final int LANGUAGE_RUSSIAN = 15;
	public static final int LANGUAGE_JAPANESE_Q = 16;
	public static final int LANGUAGE_TURKISH_F = 17;
	public static final int LANGUAGE_TURKISH_Q = 18;
	public static final int LANGUAGE_JAPANESE_H = 19;
	public static final int LANGUAGE_JAPANESE_K = 20;
	public static final int LANGUAGE_DUTCH_NL = 21;
	public static final byte RELATIVE_MODE = 1;
	public static final byte ABSOLUTE_MODE = 2;
	public static final byte OTHER_MODE = 3;
	public static final String OPTION = "Options";
	public static final String MOUSE = "Mouse";
	public static final String MOUSE_CLIENTCURSOR_CONTROL = "MouseShowCursor";
	public static final String CALIBRATEMOUSETHRESHOLD = "Calibrate Mouse Threshold";
	public static final String MOUSE_MODE = "MouseMode";
	public static final String MOUSE_RELATIVE_MODE = "Relative";
	public static final String MOUSE_ABSOLUTE_MODE = "Absolute";
	public static final String MOUSE_OTHER_MODE = "Other";
	public static final String OPTIONS_BANDWIDTH = "Bandwidth";
	public static final String OPTIONS_BANDWIDTH_AUTO_DETECT = "OptionsBandwidthAutoDetect";
	public static final String OPTIONS_BANDWIDTH_256KBPS = "OptionsBandwidth256Kbps";
	public static final String OPTIONS_BANDWIDTH_512KBPS = "OptionsBandwidth512Kbps";
	public static final String OPTIONS_BANDWIDTH_1MBPS = "OptionsBandwidth1Mbps";
	public static final String OPTIONS_BANDWIDTH_10MBPS = "OptionsBandwidth10Mbps";
	public static final String OPTIONS_BANDWIDTH_100MBPS = "OptionsBandwidth100Mbps";
	public static final String OPTIONS_KEYBOARD_MOUSE_ENCRYPTION = "OptionsKeyboardMouseEncryption";
	public static final String ZOOM = "Video Zoom";
	public static final String ZOOM_IN = "Zoom In";
	public static final String ZOOM_OUT = "Zoom Out";
	public static final String ACTUAL_SIZE = "ActualSize";
	public static final String FIT_TO_CLIENT_RES = "FitToClientResolution";
	public static final String FIT_TO_HOST_RES = "FitToHostResolution";
	public static final String ZOOM_OPTION_NONE = "ZoomOption None";
	public static final String OPTIONS_GUI_LANGUAGE = "GUI Languages";
	public static final String OPTIONS_GUI_LANGUAGE_LOCALE = "Locale";
	public static final String LOCALE_CODE_START_DELIM = " - [";
	public static final String LOCALE_CODE_END_DELIM = "]";
	public static final String OPTIONS_IPMI_COMMAND = "IPMICommand";
	public static final String OPTIONS_REQUEST_FULL_PERMISSION = "RequestFullPermission";
	public static final String OPTIONS_BLOCK_FULL_PERMISSION = "BlockFullPermission";
	public static final String MEDIA = "Media";
	public static final String DEVICE_MEDIA_DIALOG = "DeviceMediaDialog";
	public static final String HELP_ABOUT_RCONSOLE = "HelpAboutJViewer";
	public static final String VIDEO_RECORD = "VideoRecord";
	public static final String VIDEO_RECORD_SETTINGS = "VideoRecordSettings";
	public static final String VIDEO_RECORD_START = "VideoRecordStart";
	public static final String VIDEO_RECORD_STOP = "VideoRecordStop";
	public static final String POWER_CONTROL = "Power";
	public static final String POWER_RESET_SERVER = "Reset Server";
	public static final String POWER_OFF_IMMEDIATE = "Immediate Shutdown";
	public static final String POWER_OFF_ORDERLY = "Orderly Shutdown";
	public static final String POWER_ON_SERVER = "Power On Server";
	public static final String POWER_CYCLE_SERVER = "Power Cycle Server";
	public static final String ACTIVE_USERS = "Active Users";
	public JLabel menu_string;
	protected JVMenuListener m_menuListener = new JVMenuListener();
	protected static JVMenuStatusListener m_menuStatus = new JVMenuStatusListener();
	protected Hashtable<String, JMenuItem> m_menuItems;
	protected Hashtable<String, JMenu> m_menu;
	protected static Hashtable<String, Boolean> m_menuItems_setselected = new Hashtable();
	protected static Hashtable<String, Boolean> m_menuItems_setenabled = new Hashtable();
	protected static Hashtable<String, String> m_menustatusbar_text = new Hashtable();
	protected static Hashtable<String, Character> menuMnemonics = new Hashtable();
	protected static Hashtable<String, KeyStroke> menuAccelerator = new Hashtable();
	public static String previous_bandwidth = "OptionsBandwidth100Mbps";

	public static int m_mouseMode = USBMouseRep.ABSOLUTE_MOUSE_MODE;
	protected static JComboBox combo;
	public JSlider slider;
	public JLabel label_size;
	private JLabel label_Text;
	public static double m_scale = 1.0D;
	public static int keyBoardLayout = -1;
	public static int softkeyBoardLayout = -1;

	protected static String[] KVMPartialExceptionMenuItems = { "VideoPauseRedirection", "VideoResumeRedirection",
			"VideoRefresh", "VideoCaptureScreen", "VideoFullScreen", "VideoExit", "OptionsBandwidthAutoDetect",
			"OptionsBandwidth256Kbps", "OptionsBandwidth512Kbps", "OptionsBandwidth1Mbps", "OptionsBandwidth10Mbps",
			"OptionsBandwidth100Mbps", "Zoom In", "Zoom Out", "ActualSize", "FitToClientResolution",
			"FitToHostResolution", "ZoomOption None", "VideoRecordSettings", "VideoRecordStart", "VideoRecordStop",
			"HelpAboutJViewer" };

	protected static String[] KVMPartialExceptionSOCMenuItems;

	protected static String[] KVMPartialExceptionOEMMenuItems;

	private JMenu macroSubMenu;

	public JVMenu() {
		this.m_menuItems = new Hashtable();
		this.m_menu = new Hashtable();
	}

	public JMenuItem getMenuItem(String paramString) {
		return (JMenuItem) this.m_menuItems.get(paramString);
	}

	public JMenu getMenu(String paramString) {
		return (JMenu) this.m_menu.get(paramString);
	}

	public Boolean getMenuEnable(String paramString) {
		return (Boolean) m_menuItems_setenabled.get(paramString);
	}

	public Boolean SetMenuEnable(String paramString, Boolean paramBoolean) {
		return (Boolean) m_menuItems_setenabled.put(paramString, paramBoolean);
	}

	public Boolean getMenuSelected(String paramString) {
		return (Boolean) m_menuItems_setselected.get(paramString);
	}

	public Boolean SetMenuSelected(String paramString, Boolean paramBoolean) {
		return (Boolean) m_menuItems_setselected.put(paramString, paramBoolean);
	}

	public void notifyMenuStateEnable(String paramString, boolean paramBoolean) {
		if (getMenuItem(paramString) != null) {
			getMenuItem(paramString).setEnabled(paramBoolean);
			SetMenuEnable(paramString, Boolean.valueOf(paramBoolean));
		}
	}

	public void notifyMenuEnable(String paramString, boolean paramBoolean) {
		getMenu(paramString).setEnabled(paramBoolean);
		SetMenuEnable(paramString, Boolean.valueOf(paramBoolean));
	}

	public void notifyMenuStateSelected(String paramString, boolean paramBoolean) {
		getMenuItem(paramString).setSelected(paramBoolean);
		SetMenuSelected(paramString, Boolean.valueOf(paramBoolean));
	}

	public void notifyMouseMode(byte paramByte) {
		if (paramByte == USBMouseRep.RELATIVE_MOUSE_MODE) {
			notifyMenuStateEnable("Calibrate Mouse Threshold", true);
		} else {
			notifyMenuStateEnable("Calibrate Mouse Threshold", false);
		}
	}

	public void refreshMenu() {
		Set localSet1 = m_menuItems_setselected.entrySet();
		Iterator localIterator1 = localSet1.iterator();
		Set localSet2 = m_menuItems_setenabled.entrySet();
		Iterator localIterator2 = localSet2.iterator();
		Object localObject1 = null;

		boolean bool = false;
		Object localObject2;
		while (localIterator1.hasNext()) {
			try {
				Map.Entry localEntry1 = (Map.Entry) localIterator1.next();
				localObject1 = localEntry1.getKey();
				localObject2 = localEntry1.getValue();
				bool = ((Boolean) localObject2).booleanValue();
			} catch (Exception localException1) {
				Debug.out.println(localException1);
			}
			notifyMenuStateSelected((String) localObject1, bool);
		}

		while (localIterator2.hasNext()) {
			try {
				Map.Entry localEntry2 = (Map.Entry) localIterator2.next();
				localObject1 = localEntry2.getKey();
				localObject2 = localEntry2.getValue();
				bool = ((Boolean) localObject2).booleanValue();
			} catch (Exception localException2) {
				Debug.out.println(localException2);
			}
			try {
				notifyMenuStateEnable((String) localObject1, bool);
			} catch (Exception localException3) {
				notifyMenuEnable((String) localObject1, bool);
				Debug.out.println(localException3);
			}
		}
	}

	public void enableMenu(String[] paramArrayOfString, boolean paramBoolean1, boolean paramBoolean2) {
		Set localSet = m_menuItems_setenabled.entrySet();
		Iterator localIterator = localSet.iterator();
		String str = null;

		boolean bool = false;

		int j = 0;

		while (localIterator.hasNext()) {
			try {
				Map.Entry localEntry = (Map.Entry) localIterator.next();
				str = (String) localEntry.getKey();
				Object localObject = localEntry.getValue();
				bool = ((Boolean) localObject).booleanValue();
			} catch (Exception localException1) {
				Debug.out.println(localException1);
			}
			try {
				bool = paramBoolean1;
				j = 0;

				if (paramArrayOfString != null) {
					for (int i = 0; i < paramArrayOfString.length; i++) {
						if (str.equals(paramArrayOfString[i])) {
							j = 1;
							break;
						}
					}
				}
				if (!str.startsWith("Locale")) {

					if ((str.startsWith("SKBD_")) && (KVMSharing.KVM_REQ_GIVEN == 0)) {
						notifyMenuStateEnable(str, true);

					} else if (1 != j)
						if (paramBoolean2) {
							notifyMenuStateEnable(str, bool);
						} else if (getMenuItem(str) != null)
							getMenuItem(str).setEnabled(paramBoolean1);
				}
			} catch (Exception localException2) {
				Debug.out.println(localException2);
			}
		}
	}

	public void changeMenuItemLanguage() {
		Set localSet = this.m_menuItems.entrySet();
		Iterator localIterator = localSet.iterator();
		Object localObject = null;

		String str1 = null;
		String str2 = null;
		String str3 = null;
		String str4 = null;

		while (localIterator.hasNext()) {
			try {
				Map.Entry localEntry = (Map.Entry) localIterator.next();
				localObject = localEntry.getKey();
				JMenuItem localJMenuItem = JViewerApp.getInstance().getJVMenu().getMenuItem(localObject.toString());
				String str5 = " - [";
				String str6 = localJMenuItem.getText();

				if (localJMenuItem.getActionCommand().startsWith("Locale")) {
					if ((str6.contains(str5)) && (str6.endsWith("]"))) {
						str4 = getLocaleCode(str6);

						if (str4.length() == 2) {
							Locale localLocale = new Locale(str4.toLowerCase());
							str3 = localLocale.getDisplayLanguage(new Locale(JViewer.getLanguage()));
							str1 = str3.concat(str5).concat(str4).concat("]");
							if (str1 != null) {
								localJMenuItem.setText(str1);
							}
						}
					}
				} else {
					str1 = LocaleStrings.getStringKey(localJMenuItem.getText());

					if (localJMenuItem.equals(getMenuItem("HelpAboutJViewer"))) {
						localJMenuItem.setText(LocaleStrings.getString("F_69_JVM") + JViewer.getTitle());
					} else if (str1 != null) {
						str2 = LocaleStrings.getString(str1);
						if (str2 == null)
							str2 = LocaleStrings.getSOCString(str1);
						localJMenuItem.setText(str2);
					}
				}
			} catch (Exception localException) {
				Debug.out.println(localException);
			}
		}
	}

	public void changeMenuLanguage() {
		Set localSet = this.m_menu.entrySet();
		Iterator localIterator = localSet.iterator();
		Object localObject = null;
		String str1 = null;

		String str2 = null;
		JMenu localJMenu = null;

		while (localIterator.hasNext()) {
			try {
				Map.Entry localEntry = (Map.Entry) localIterator.next();
				localObject = localEntry.getKey();
				localJMenu = JViewerApp.getInstance().getJVMenu().getMenu(localObject.toString());

				str2 = LocaleStrings.getStringKey(localJMenu.getText());
				if (str2 != null) {
					str1 = LocaleStrings.getString(str2);
					if (str1 == null)
						str1 = LocaleStrings.getSOCString(str2);
					localJMenu.setText(str1);
				}
			} catch (Exception localException) {
				Debug.out.println(localException);
			}
		}
	}

	public void changeStatusBarLanguage() {
		Set localSet = m_menustatusbar_text.entrySet();
		Iterator localIterator = localSet.iterator();
		Object localObject1 = null;
		Object localObject2 = null;

		String str1 = null;
		String str2 = null;
		String str3 = null;
		String str4 = null;

		while (localIterator.hasNext()) {
			try {
				Map.Entry localEntry = (Map.Entry) localIterator.next();
				localObject1 = localEntry.getKey();
				localObject2 = localEntry.getValue();

				if (localObject2.toString().startsWith(LocaleStrings.getPreviousLocaleString("F_119_JVM"))) {
					str4 = getLocaleCode(localObject2.toString());

					Locale localLocale = new Locale(str4.toLowerCase());
					str3 = localLocale.getDisplayLanguage(new Locale(JViewer.getLanguage()));
					str1 = LocaleStrings.getString("F_119_JVM") + str3 + " - [" + str4 + "]";

					if (str1 != null) {
						m_menustatusbar_text.put(localObject1.toString(), str1);
					}
				} else if (localObject2.toString().startsWith(LocaleStrings.getPreviousLocaleString("F_75_JVM"))) {
					str2 = localizeKeboardLayoutMenuStatus(localObject2.toString());
					if (localObject2.toString().endsWith(LocaleStrings.getPreviousLocaleString("F_76_JVM"))) {
						str2 = str2 + LocaleStrings.getString("F_76_JVM");
					} else if (localObject2.toString().endsWith(LocaleStrings.getPreviousLocaleString("F_116_JVM")))
						str2 = str2 + LocaleStrings.getString("F_116_JVM");
					m_menustatusbar_text.put(localObject1.toString(), str2);
				} else {
					str1 = LocaleStrings.getStringKey(localObject2.toString());
					if (str1 != null) {
						str2 = LocaleStrings.getString(str1);
						if (str2 == null)
							str2 = LocaleStrings.getSOCString(str1);
						m_menustatusbar_text.put(localObject1.toString(), str2);
					}
				}
			} catch (Exception localException) {
				Debug.out.println(localException);
			}
		}
	}

	private String localizeKeboardLayoutMenuStatus(String paramString) {
		String str = LocaleStrings.getString("F_75_JVM");

		if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_77_JVM"))) {
			str = str + LocaleStrings.getString("F_77_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_78_JVM"))) {
			str = str + LocaleStrings.getString("F_78_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_79_JVM"))) {
			str = str + LocaleStrings.getString("F_79_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_80_JVM"))) {
			str = str + LocaleStrings.getString("F_80_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_81_JVM"))) {
			str = str + LocaleStrings.getString("F_81_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_82_JVM"))) {
			str = str + LocaleStrings.getString("F_82_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_83_JVM"))) {
			str = str + LocaleStrings.getString("F_83_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_84_JVM"))) {
			str = str + LocaleStrings.getString("F_84_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_85_JVM"))) {
			str = str + LocaleStrings.getString("F_85_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_86_JVM"))) {
			str = str + LocaleStrings.getString("F_86_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_87_JVM"))) {
			str = str + LocaleStrings.getString("F_87_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_88_JVM"))) {
			str = str + LocaleStrings.getString("F_88_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_89_JVM"))) {
			str = str + LocaleStrings.getString("F_89_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_90_JVM"))) {
			str = str + LocaleStrings.getString("F_90_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_91_JVM"))) {
			str = str + LocaleStrings.getString("F_91_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_92_JVM"))) {
			str = str + LocaleStrings.getString("F_92_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_93_JVM"))) {
			str = str + LocaleStrings.getString("F_93_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_94_JVM"))) {
			str = str + LocaleStrings.getString("F_94_JVM");
		} else if (paramString.contains(LocaleStrings.getPreviousLocaleString("F_95_JVM"))) {
			str = str + LocaleStrings.getString("F_95_JVM");
		}
		return str;
	}

	private class JVMenuListener implements ActionListener {
		private JVMenuListener() {
		}

		public void actionPerformed(ActionEvent paramActionEvent) {
			if (JViewerApp.getOEMManager().getOEMJVMenu().handleMenuEvents(paramActionEvent) == 1) {
				return;
			}
			String str1 = paramActionEvent.getActionCommand();
			JViewerApp localJViewerApp = JViewerApp.getInstance();

			if (str1.equals("VideoPauseRedirection")) {
				localJViewerApp.setM_userPause(true);
				localJViewerApp.OnVideoPauseRedirection();
			} else if (str1.equals("VideoResumeRedirection")) {
				localJViewerApp.OnVideoResumeRedirection();
			} else if (str1.equals("VideoRefresh")) {
				localJViewerApp.OnVideoRefreshRedirection();
			} else if (str1.equals("VideoHostDisplayUnlock")) {
				localJViewerApp.onSendHostLock((byte) 0);
			} else if (str1.equals("VideoHostDisplayLock")) {
				localJViewerApp.onSendHostLock((byte) 1);
			} else if (str1.equals("VideoCaptureScreen")) {
				localJViewerApp.onVideoCaptureScreen();
			} else {
				Object localObject;
				if (str1.equals("VideoFullScreen")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnVideoFullScreen(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("VideoExit")) {
					localJViewerApp.OnVideoExit();
				} else if (str1.equals("KeyboardHoldRightCtrlKey")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardHoldRightCtrlKey(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardHoldRightAltKey")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardHoldRightAltKey(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardHoldLeftCtrlKey")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardHoldLeftCtrlKey(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardHoldLeftAltKey")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardHoldLeftAltKey(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardLeftWindowsKeyHoldDown")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardLeftWindowsKeyHoldDown(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardLeftWindowsKeyPressRelease")) {
					localJViewerApp.OnKeyboardLeftWindowsKeyPressRelease();
				} else if (str1.equals("KeyboardRightWindowsKeyHoldDown")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					localJViewerApp.OnKeyboardRightWindowsKeyHoldDown(((JCheckBoxMenuItem) localObject).getState());
				} else if (str1.equals("KeyboardRightWindowsKeyPressRelease")) {
					localJViewerApp.OnKeyboardRightWindowsKeyPressRelease();
				} else if (str1.equals("KeyboardCtrlAltDel")) {
					if (((localJViewerApp.getJVMenu().getMenuSelected("KeyboardHoldLeftCtrlKey").booleanValue())
							|| (localJViewerApp.getJVMenu().getMenuSelected("KeyboardHoldRightCtrlKey").booleanValue()))
							&& ((localJViewerApp.getJVMenu().getMenuSelected("KeyboardHoldLeftAltKey").booleanValue())
									|| (localJViewerApp.getJVMenu().getMenuSelected("KeyboardHoldRightAltKey")
											.booleanValue()))) {
						return;
					}
					localJViewerApp.OnKeyboardAltCtrlDel();
				} else if (str1.equals("KeyboardContextMenu")) {
					localJViewerApp.OnKeyboardContextMenu();
				} else if (str1.equals("Full Keyborad Support")) {
					localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
					JVMenu.this.SetMenuSelected("Full Keyborad Support",
							Boolean.valueOf(((JCheckBoxMenuItem) localObject).getState()));
					JViewerApp.getInstance().setFullKeyboardEnabled(((JCheckBoxMenuItem) localObject).getState());
					JVMenu.this.enableMenuMnemonics(((JCheckBoxMenuItem) localObject).getState());
					JVMenu.this.enableMenuAccelerator(((JCheckBoxMenuItem) localObject).getState());
				} else if (!str1.equals("Windows host")) {

					if (!str1.equals("Linux host")) {

						if (str1.equals("Add Hotkeys")) {
							localJViewerApp.OnAddMacro();
						} else if (str1.equals("MouseShowCursor")) {
							localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
							localJViewerApp.OnShowCursor(((JCheckBoxMenuItem) localObject).getState());
						} else if (str1.equals("Calibrate Mouse Threshold")) {
							localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
							if (JViewerApp.getInstance().GetRedirectionState() == JViewerApp.REDIR_STARTED) {
								localJViewerApp.OnCalibareteMouse(((JCheckBoxMenuItem) localObject).getState());
							} else {
								JViewerApp.getInstance().getJVMenu()
										.notifyMenuStateSelected("Calibrate Mouse Threshold", false);
							}
						} else if (str1.equals("Absolute")) {
							if (JVMenu.m_mouseMode != 2) {
								localJViewerApp.OnSendMouseMode((byte) 2);
							}
						} else if (str1.equals("Relative")) {
							if (JVMenu.m_mouseMode != 1) {
								localJViewerApp.OnSendMouseMode((byte) 1);
							}
						} else if (str1.equals("Other")) {
							if (JVMenu.m_mouseMode != 3) {
								localJViewerApp.OnSendMouseMode((byte) 3);
							}
						} else if (str1.equals("OptionsBandwidthAutoDetect")) {
							localJViewerApp.OnOptionsBandwidthAutoDetect();
						} else if (str1.equals("OptionsBandwidth256Kbps")) {
							localJViewerApp.OnOptionsBandwidth(32768);
						} else if (str1.equals("OptionsBandwidth512Kbps")) {
							localJViewerApp.OnOptionsBandwidth(65536);
						} else if (str1.equals("OptionsBandwidth1Mbps")) {
							localJViewerApp.OnOptionsBandwidth(131072);
						} else if (str1.equals("OptionsBandwidth10Mbps")) {
							localJViewerApp.OnOptionsBandwidth(1310720);
						} else if (str1.equals("OptionsBandwidth100Mbps")) {
							localJViewerApp.OnOptionsBandwidth(13107200);
						} else if (str1.equals("OptionsKeyboardMouseEncryption")) {
							localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
							localJViewerApp
									.OnOptionsKeyboardMouseEncryption(((JCheckBoxMenuItem) localObject).getState());
						} else if (str1.startsWith("IPMICommand")) {
							localJViewerApp.invokeIPMICommandDialog();
						} else {
							String str2;
							if (str1.startsWith("Locale")) {
								localObject = (JMenuItem) paramActionEvent.getSource();
								str2 = JVMenu.this.getLocaleCode(((JMenuItem) localObject).getText());
								localJViewerApp.OnGUILanguageChange(str2);
							} else if (str1.equals("RequestFullPermission")) {

								localObject = (JMenuItem) paramActionEvent.getSource();
								((JMenuItem) localObject).setEnabled(false);
								localJViewerApp.onSendFullPermissionRequest();
							} else if (str1.equals("BlockFullPermission")) {
								localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();
								KVMSharing.BLOCK_KVM_REQ = ((JCheckBoxMenuItem) localObject).getState();
							} else if (str1.equals("HelpAboutJViewer")) {
								localJViewerApp.OnHelpAboutJViewer();
							} else if (str1.equals("DeviceMediaDialog")) {
								Debug.out.println("MEDIA LICENSE STATUS : " + JViewer.getMediaLicenseStatus());
								if (JViewer.getMediaLicenseStatus() == 1) {
									localJViewerApp.OnvMedia(0);
								} else {
									InfoDialog.showDialog(JViewer.getMainFrame(), LocaleStrings.getString("F_136_JVM"),
											LocaleStrings.getString("2_4_KVMCLIENT"), 1);
								}

							} else if (str1.equals("Auto detect")) {
								localObject = (JCheckBoxMenuItem) paramActionEvent.getSource();

								localJViewerApp.onAutoKeyboardLayout(((JCheckBoxMenuItem) localObject).getState(),
										true);
							} else if (str1.equals("US")) {
								JViewerApp.getInstance().setKeyProcessor("US");
							} else if (str1.equals("GB")) {
								JViewerApp.getInstance().setKeyProcessor("GB");
							} else if (str1.equals("FR")) {
								JViewerApp.getInstance().setKeyProcessor("FR");
							} else if (str1.equals("FR-BE")) {
								JViewerApp.getInstance().setKeyProcessor("FR-BE");
							} else if (str1.equals("DE")) {
								JViewerApp.getInstance().setKeyProcessor("DE");
							} else if (str1.equals("DE-CH")) {
								JViewerApp.getInstance().setKeyProcessor("DE-CH");
							} else if (str1.equals("JP")) {
								JViewerApp.getInstance().setKeyProcessor("JP");
							} else if (str1.equals("ES")) {
								JViewerApp.getInstance().setKeyProcessor("ES");
							} else if (str1.equals("IT")) {
								JViewerApp.getInstance().setKeyProcessor("IT");
							} else if (str1.equals("DA")) {
								JViewerApp.getInstance().setKeyProcessor("DA");
							} else if (str1.equals("FI")) {
								JViewerApp.getInstance().setKeyProcessor("FI");
							} else if (str1.equals("NO")) {
								JViewerApp.getInstance().setKeyProcessor("NO");
							} else if (str1.equals("PT")) {
								JViewerApp.getInstance().setKeyProcessor("PT");
							} else if (str1.equals("SV")) {
								JViewerApp.getInstance().setKeyProcessor("SV");
							} else if (str1.equals("NL-NL")) {
								JViewerApp.getInstance().setKeyProcessor("NL-NL");
							} else if (str1.equals("NL-BE")) {
								JViewerApp.getInstance().setKeyProcessor("NL-BE");
							} else if (str1.equals("TR_F")) {
								JViewerApp.getInstance().setKeyProcessor("TR_F");
							} else if (str1.equals("TR_Q")) {
								JViewerApp.getInstance().setKeyProcessor("TR_Q");
							} else if (str1.equals("SKBD_English(United States)")) {
								localJViewerApp.OnSkbrdDisplay(0);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 0;
							} else if (str1.equals("SKBD_English(United Kingdom)")) {
								localJViewerApp.OnSkbrdDisplay(1);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 1;
							} else if (str1.equals("SKBD_Spanish")) {
								localJViewerApp.OnSkbrdDisplay(2);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 2;
							} else if (str1.equals("SKBD_French")) {
								localJViewerApp.OnSkbrdDisplay(3);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 3;
							} else if (str1.equals("SKBD_German(Germany)")) {
								localJViewerApp.OnSkbrdDisplay(4);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 4;
							} else if (str1.equals("SKBD_Italian")) {
								localJViewerApp.OnSkbrdDisplay(5);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 5;
							} else if (str1.equals("SKBD_Danish")) {
								localJViewerApp.OnSkbrdDisplay(6);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 6;
							} else if (str1.equals("SKBD_Finnish")) {
								localJViewerApp.OnSkbrdDisplay(7);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 7;
							} else if (str1.equals("SKBD_German(Switzerland)")) {
								localJViewerApp.OnSkbrdDisplay(8);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 8;
							} else if (str1.equals("SKBD_Norwegian(Norway)")) {
								localJViewerApp.OnSkbrdDisplay(9);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 9;
							} else if (str1.equals("SKBD_Portuguese(Portugal)")) {
								localJViewerApp.OnSkbrdDisplay(10);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 10;
							} else if (str1.equals("SKBD_Swedish")) {
								localJViewerApp.OnSkbrdDisplay(11);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 11;
							} else if (str1.equals("SKBD_Hebrew")) {
								localJViewerApp.OnSkbrdDisplay(12);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 12;
							} else if (str1.equals("SKBD_French(Belgium)")) {
								localJViewerApp.OnSkbrdDisplay(13);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 13;
							} else if (str1.equals("SKBD_Dutch(Belgium)")) {
								localJViewerApp.OnSkbrdDisplay(14);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 14;
							} else if (str1.equals("SKBD_Dutch(Netherlands)")) {
								localJViewerApp.OnSkbrdDisplay(21);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 21;
							} else if (str1.equals("SKBD_Russian")) {
								localJViewerApp.OnSkbrdDisplay(15);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 15;
							} else if (str1.equals("SKBD_Japanese - Q")) {
								localJViewerApp.OnSkbrdDisplay(16);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 16;
							} else if (str1.equals("SKBD_Japanese Hiragana")) {
								localJViewerApp.OnSkbrdDisplay(19);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 19;
							} else if (str1.equals("SKBD_Japanese Katakana")) {
								localJViewerApp.OnSkbrdDisplay(20);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 20;
							} else if (str1.equals("SKBD_Turkish - F")) {
								localJViewerApp.OnSkbrdDisplay(17);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 17;
							} else if (str1.equals("SKBD_Turkish - Q")) {
								localJViewerApp.OnSkbrdDisplay(18);
								JVMenu.softkeyBoardLayout = JVMenu.keyBoardLayout = 18;
							} else if (str1.equals("VideoRecordStart")) {
								if (JViewerApp.getInstance().getM_videorecord() == null) {
									JViewerApp.getInstance().setM_videorecord(new VideoRecord());
									JViewerApp.getInstance().getM_videorecord().StoreLocation = JViewerApp
											.getInstance().VIDEO_RECORD_DEFAULT_PATH;
									VideoRecord.RecordStopTimer = JViewerApp.getInstance().VIDEO_RECORD_DEFAULT_TIME;
								}
								localJViewerApp.getM_videorecord().OnVideoRecordStart();
							} else if (str1.equals("VideoRecordStop")) {
								localJViewerApp.getM_videorecord().OnVideoRecordStop();
							} else if (str1.equals("VideoRecordSettings")) {
								localJViewerApp.OnVideoRecordSettings();
							} else if (str1.equals("Zoom In")) {
								localJViewerApp.OnVideoZoomIn();
							} else if (str1.equals("Zoom Out")) {
								localJViewerApp.OnVideoZoomOut();
							} else if ((str1.equals("ActualSize")) || (str1.equals("FitToClientResolution"))
									|| (str1.equals("FitToHostResolution"))) {
								if (!str1.equals(JViewerApp.getInstance().getZoomOption()))
									localJViewerApp.onChangeZoomOptions(str1);
							} else if (str1.equals("Reset Server")) {
								localJViewerApp.onSendPowerControlCommand("Reset Server");
							} else if (str1.equals("Immediate Shutdown")) {
								localJViewerApp.onSendPowerControlCommand("Immediate Shutdown");
							} else if (str1.equals("Orderly Shutdown")) {
								localJViewerApp.onSendPowerControlCommand("Orderly Shutdown");
							} else if (str1.equals("Power On Server")) {
								localJViewerApp.onSendPowerControlCommand("Power On Server");
							} else if (str1.equals("Power Cycle Server")) {
								localJViewerApp.onSendPowerControlCommand("Power Cycle Server");
							} else if (str1.startsWith("HK_")) {
								localObject = JViewerApp.getInstance().getAddMacro().macroMap.entrySet();
								str2 = str1.substring(3);
								Iterator localIterator = ((Set) localObject).iterator();
								while (localIterator.hasNext()) {
									Map.Entry localEntry = (Map.Entry) localIterator.next();
									String str3 = (String) localEntry.getKey();
									if (str2.equals(str3)) {
										JViewerApp.getInstance().OnsendMacrokeycode((String) localEntry.getValue());
									}
								}
							} else {
								localJViewerApp.getSoc_App().SOC_Menu_ActionMethod(paramActionEvent);
							}
						}
					}
				}
			}
		}
	}

	private static class JVMenuStatusListener extends MouseAdapter {
		public void mouseEntered(MouseEvent paramMouseEvent) {
			String str1;

			try {
				JMenu localJMenu = (JMenu) paramMouseEvent.getSource();
				str1 = localJMenu.getActionCommand();
			} catch (Exception localException) {
				Debug.out.println(paramMouseEvent);
				str1 = ((JMenuItem) paramMouseEvent.getSource()).getActionCommand();
			}

			JViewerApp localJViewerApp = JViewerApp.getInstance();
			String str2 = (String) JVMenu.m_menustatusbar_text.get(str1);
			localJViewerApp.setStatus(str2);
		}

		public void mouseExited(MouseEvent paramMouseEvent) {
			JViewerApp.getInstance().resetStatus();
		}
	}

	protected JMenu createMenu(String paramString1, String paramString2, char paramChar, String paramString3) {
		JMenu localJMenu = new JMenu(paramString1);
		if (paramChar != ' ') {
			localJMenu.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		if ((paramString2 != null) && (paramString2.length() != 0)) {
			localJMenu.setActionCommand(paramString2);
			this.m_menu.put(paramString2, localJMenu);
			if (paramString3 != null) {
				localJMenu.addMouseListener(m_menuStatus);
				m_menustatusbar_text.put(paramString2, paramString3);
			}
		}
		return localJMenu;
	}

	protected JMenuItem createMenuItem(String paramString1, char paramChar, int paramInt1, int paramInt2,
			String paramString2, String paramString3) {
		JMenuItem localJMenuItem = new JMenuItem(paramString1);
		localJMenuItem.addActionListener(this.m_menuListener);
		localJMenuItem.addMouseListener(m_menuStatus);
		if (paramChar != ' ') {
			localJMenuItem.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		if ((paramInt1 != 0) && (paramInt2 != 0)) {
			localJMenuItem.setAccelerator(KeyStroke.getKeyStroke(paramInt1, paramInt2));
			menuAccelerator.put(paramString2, KeyStroke.getKeyStroke(paramInt1, paramInt2));
		}
		localJMenuItem.setActionCommand(paramString2);
		this.m_menuItems.put(paramString2, localJMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		if (INITIAL_MENU_STATUS)
			m_menuItems_setenabled.put(paramString2, Boolean.valueOf(true));
		return localJMenuItem;
	}

	protected JMenuItem createMenuItem(String paramString1, char paramChar, String paramString2, String paramString3) {
		JMenuItem localJMenuItem = new JMenuItem(paramString1);
		localJMenuItem.addActionListener(this.m_menuListener);
		localJMenuItem.addMouseListener(m_menuStatus);
		if (paramChar != ' ') {
			localJMenuItem.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		localJMenuItem.setActionCommand(paramString2);
		this.m_menuItems.put(paramString2, localJMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		if (INITIAL_MENU_STATUS)
			m_menuItems_setenabled.put(paramString2, Boolean.valueOf(true));
		return localJMenuItem;
	}

	protected JMenuItem createMenuItem(String paramString1, char paramChar, String paramString2, String paramString3,
			boolean paramBoolean) {
		JMenuItem localJMenuItem = new JMenuItem(paramString1);
		localJMenuItem.addActionListener(this.m_menuListener);
		localJMenuItem.addMouseListener(m_menuStatus);
		if (paramChar != ' ') {
			localJMenuItem.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		localJMenuItem.setActionCommand(paramString2);
		localJMenuItem.setEnabled(paramBoolean);
		this.m_menuItems.put(paramString2, localJMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		return localJMenuItem;
	}

	protected JCheckBoxMenuItem createCheckBoxMenuItem(String paramString1, char paramChar, int paramInt1,
			int paramInt2, String paramString2, String paramString3) {
		JCheckBoxMenuItem localJCheckBoxMenuItem = new JCheckBoxMenuItem(paramString1);
		localJCheckBoxMenuItem.addActionListener(this.m_menuListener);
		localJCheckBoxMenuItem.addMouseListener(m_menuStatus);
		if (paramChar != ' ') {
			localJCheckBoxMenuItem.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		localJCheckBoxMenuItem.setActionCommand(paramString2);
		if ((paramInt1 != 0) && (paramInt2 != 0)) {
			localJCheckBoxMenuItem.setAccelerator(KeyStroke.getKeyStroke(paramInt1, paramInt2));
			menuAccelerator.put(paramString2, KeyStroke.getKeyStroke(paramInt1, paramInt2));
		}
		this.m_menuItems.put(paramString2, localJCheckBoxMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		if (INITIAL_MENU_STATUS) {
			m_menuItems_setselected.put(paramString2, Boolean.valueOf(false));
			m_menuItems_setenabled.put(paramString2, Boolean.valueOf(true));
		}

		return localJCheckBoxMenuItem;
	}

	protected JCheckBoxMenuItem createCheckBoxMenuItem(String paramString1, char paramChar, String paramString2,
			String paramString3) {
		JCheckBoxMenuItem localJCheckBoxMenuItem = new JCheckBoxMenuItem(paramString1);
		localJCheckBoxMenuItem.addActionListener(this.m_menuListener);
		localJCheckBoxMenuItem.addMouseListener(m_menuStatus);
		if (paramChar != ' ') {
			localJCheckBoxMenuItem.setMnemonic(paramChar);
			menuMnemonics.put(paramString2, Character.valueOf(paramChar));
		}
		localJCheckBoxMenuItem.setActionCommand(paramString2);
		this.m_menuItems.put(paramString2, localJCheckBoxMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		if (INITIAL_MENU_STATUS) {
			m_menuItems_setselected.put(paramString2, Boolean.valueOf(false));
			m_menuItems_setenabled.put(paramString2, Boolean.valueOf(true));
		}

		return localJCheckBoxMenuItem;
	}

	protected JRadioButtonMenuItem createRadioButtonMenu(String paramString1, String paramString2,
			String paramString3) {
		JRadioButtonMenuItem localJRadioButtonMenuItem = new JRadioButtonMenuItem(paramString1);
		localJRadioButtonMenuItem.addActionListener(this.m_menuListener);
		localJRadioButtonMenuItem.addMouseListener(m_menuStatus);
		localJRadioButtonMenuItem.setActionCommand(paramString2);
		this.m_menuItems.put(paramString2, localJRadioButtonMenuItem);
		m_menustatusbar_text.put(paramString2, paramString3);
		if (INITIAL_MENU_STATUS) {
			m_menuItems_setselected.put(paramString2, Boolean.valueOf(false));
			m_menuItems_setenabled.put(paramString2, Boolean.valueOf(true));
		}
		return localJRadioButtonMenuItem;
	}

	protected JMenu constructVideoMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_1_JVM"), "Video", 'V',
				LocaleStrings.getString("F_2_JVM"));

		Object localObject = createMenuItem(LocaleStrings.getString("F_3_JVM"), 'P', 80, 8, "VideoPauseRedirection",
				LocaleStrings.getString("F_4_JVM"));
		localJMenu.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_5_JVM"), 'R', 82, 8, "VideoResumeRedirection",
				LocaleStrings.getString("F_6_JVM"));
		localJMenu.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_7_JVM"), 'e', 69, 8, "VideoRefresh",
				LocaleStrings.getString("F_8_JVM"));
		localJMenu.add((JMenuItem) localObject);
		localObject = createMenuItem(LocaleStrings.getString("F_134_JVM"), 'n', 0, 0, "VideoHostDisplayUnlock",
				LocaleStrings.getString("F_135_JVM"));
		localJMenu.add((JMenuItem) localObject);
		localObject = createMenuItem(LocaleStrings.getString("F_137_JVM"), 'n', 0, 0, "VideoHostDisplayLock",
				LocaleStrings.getString("F_138_JVM"));
		localJMenu.add((JMenuItem) localObject);
		localObject = createMenuItem(LocaleStrings.getString("F_121_JVM"), 'S', 83, 8, "VideoCaptureScreen",
				LocaleStrings.getString("F_121_JVM"));
		localJMenu.add((JMenuItem) localObject);
		localJMenu.addSeparator();

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_9_JVM"), 'F', 70, 8, "VideoFullScreen",
				LocaleStrings.getString("F_10_JVM"));
		if (JViewer.isStandalone())
			localJMenu.add((JMenuItem) localObject);
		((JMenuItem) localObject).setEnabled(false);
		localJMenu.addSeparator();

		localObject = createMenuItem(LocaleStrings.getString("F_11_JVM"), ' ', "VideoExit",
				LocaleStrings.getString("F_12_JVM"));
		localJMenu.add((JMenuItem) localObject);

		return localJMenu;
	}

	protected JMenu constructKeyboardMenu() {
		JMenu localJMenu1 = createMenu(LocaleStrings.getString("F_13_JVM"), "Keyboard", 'K',
				LocaleStrings.getString("F_14_JVM"));

		Object localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_15_JVM"), 'C',
				"KeyboardHoldRightCtrlKey", LocaleStrings.getString("F_18_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_16_JVM"), 'A', "KeyboardHoldRightAltKey",
				LocaleStrings.getString("F_19_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_17_JVM"), 't', "KeyboardHoldLeftCtrlKey",
				LocaleStrings.getString("F_20_JVM"));
		((JMenuItem) localObject).setDisplayedMnemonicIndex(11);
		localJMenu1.add((JMenuItem) localObject);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_120_JVM"), 'l', "KeyboardHoldLeftAltKey",
				LocaleStrings.getString("F_21_JVM"));
		((JMenuItem) localObject).setDisplayedMnemonicIndex(11);
		localJMenu1.add((JMenuItem) localObject);
		localJMenu1.addSeparator();

		JMenu localJMenu2 = createMenu(LocaleStrings.getString("F_22_JVM"), LocaleStrings.getString("F_22_JVM"), ' ',
				null);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_23_JVM"), ' ', "KeyboardLeftWindowsKeyHoldDown",
				LocaleStrings.getString("F_25_JVM"));
		localJMenu2.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_24_JVM"), ' ', "KeyboardLeftWindowsKeyPressRelease",
				LocaleStrings.getString("F_26_JVM"));
		localJMenu2.add((JMenuItem) localObject);
		localJMenu1.add(localJMenu2);

		localJMenu2 = createMenu(LocaleStrings.getString("F_27_JVM"), LocaleStrings.getString("F_27_JVM"), ' ', null);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_23_JVM"), ' ',
				"KeyboardRightWindowsKeyHoldDown", LocaleStrings.getString("F_28_JVM"));
		localJMenu2.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_24_JVM"), ' ', "KeyboardRightWindowsKeyPressRelease",
				LocaleStrings.getString("F_29_JVM"));
		localJMenu2.add((JMenuItem) localObject);
		localJMenu1.add(localJMenu2);

		localObject = createMenuItem("Ctrl+Alt+Del", ' ', "KeyboardCtrlAltDel", LocaleStrings.getString("F_30_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_31_JVM"), ' ', "KeyboardContextMenu",
				LocaleStrings.getString("F_32_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		this.macroSubMenu = createMenu(LocaleStrings.getString("F_33_JVM"), LocaleStrings.getString("F_33_JVM"), ' ',
				null);

		localObject = createMenuItem(LocaleStrings.getString("F_34_JVM"), ' ', "Add Hotkeys",
				LocaleStrings.getString("F_35_JVM"));
		this.macroSubMenu.add((JMenuItem) localObject);
		localJMenu1.add(this.macroSubMenu);

		localJMenu1.addSeparator();

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_130_JVM"), ' ', "Full Keyborad Support",
				LocaleStrings.getString("F_131_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		return localJMenu1;
	}

	protected JMenu constructMouseMenu() {
		JMenu localJMenu1 = createMenu(LocaleStrings.getString("F_36_JVM"), "Mouse", 'u',
				LocaleStrings.getString("F_114_JVM"));

		Object localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_37_JVM"), ' ', 67, 8, "MouseShowCursor",
				LocaleStrings.getString("F_38_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_39_JVM"), ' ', 84, 8,
				"Calibrate Mouse Threshold", LocaleStrings.getString("F_40_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		JMenu localJMenu2 = createMenu(LocaleStrings.getString("F_41_JVM"), LocaleStrings.getString("F_41_JVM"), ' ',
				null);

		ButtonGroup localButtonGroup = new ButtonGroup();

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_42_JVM"), "Absolute",
				LocaleStrings.getString("F_43_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_44_JVM"), "Relative",
				LocaleStrings.getString("F_45_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_46_JVM"), "Other",
				LocaleStrings.getString("F_47_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);
		localJMenu1.add(localJMenu2);

		return localJMenu1;
	}

	protected JMenu constructOptionsMenu() {
		JMenu localJMenu1 = createMenu(LocaleStrings.getString("F_48_JVM"), "Options", 'O',
				LocaleStrings.getString("F_49_JVM"));

		JMenu localJMenu2 = createMenu(LocaleStrings.getString("F_50_JVM"), null, ' ', null);
		m_menustatusbar_text.put("Bandwidth", LocaleStrings.getString("F_51_JVM"));
		this.m_menu.put("Bandwidth", localJMenu2);

		Object localObject = createMenuItem(LocaleStrings.getString("F_52_JVM"), ' ', "OptionsBandwidthAutoDetect",
				LocaleStrings.getString("F_53_JVM"));
		localJMenu2.add((JMenuItem) localObject);
		localJMenu2.addSeparator();

		ButtonGroup localButtonGroup1 = new ButtonGroup();

		localObject = createRadioButtonMenu("256 Kbps", "OptionsBandwidth256Kbps",
				LocaleStrings.getString("F_54_JVM") + " 256 Kbps " + LocaleStrings.getString("F_55_JVM"));
		localButtonGroup1.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("512 Kbps", "OptionsBandwidth512Kbps",
				LocaleStrings.getString("F_54_JVM") + " 512 Kbps " + LocaleStrings.getString("F_55_JVM"));
		localButtonGroup1.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("1 Mbps", "OptionsBandwidth1Mbps",
				LocaleStrings.getString("F_54_JVM") + " 1 Mbps " + LocaleStrings.getString("F_55_JVM"));
		localButtonGroup1.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("10 Mbps", "OptionsBandwidth10Mbps",
				LocaleStrings.getString("F_54_JVM") + " 10 Mbps " + LocaleStrings.getString("F_55_JVM"));
		localButtonGroup1.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("100 Mbps", "OptionsBandwidth100Mbps",
				LocaleStrings.getString("F_54_JVM") + " 100 Mbps " + LocaleStrings.getString("F_55_JVM"));
		localButtonGroup1.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);
		localJMenu1.add(localJMenu2);

		if ((!JViewer.isUseSSL()) || (!JViewer.isSinglePortEnabled())) {
			localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_56_JVM"), ' ',
					"OptionsKeyboardMouseEncryption", LocaleStrings.getString("F_57_JVM"));
			localJMenu1.add((JMenuItem) localObject);
		}

		localJMenu2 = createMenu(LocaleStrings.getString("F_58_JVM"), null, ' ', null);

		m_menustatusbar_text.put("Video Zoom", LocaleStrings.getString("F_59_JVM"));
		this.m_menu.put("Video Zoom", localJMenu2);

		localObject = createMenuItem(LocaleStrings.getString("F_60_JVM"), ' ', "Zoom In",
				LocaleStrings.getString("F_61_JVM"));
		localJMenu2.add((JMenuItem) localObject);

		localObject = createMenuItem(LocaleStrings.getString("F_62_JVM"), ' ', "Zoom Out",
				LocaleStrings.getString("F_63_JVM"));
		localJMenu2.add((JMenuItem) localObject);
		localJMenu2.addSeparator();
		ButtonGroup localButtonGroup2 = new ButtonGroup();

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_122_JVM"), "ActualSize",
				LocaleStrings.getString("F_123_JVM"));
		localButtonGroup2.add((AbstractButton) localObject);
		((JMenuItem) localObject).setSelected(true);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_124_JVM"), "FitToClientResolution",
				LocaleStrings.getString("F_125_JVM"));
		localButtonGroup2.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_126_JVM"), "FitToHostResolution",
				LocaleStrings.getString("F_127_JVM"));
		localButtonGroup2.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("ZoomOption None", "ZoomOption None", "ZoomOption None");
		localButtonGroup2.add((AbstractButton) localObject);
		localJMenu1.add(localJMenu2);

		localJMenu1.addSeparator();

		localObject = createMenuItem(LocaleStrings.getString("F_128_JVM"), ' ', "IPMICommand",
				LocaleStrings.getString("F_129_JVM"));
		localJMenu1.add((JMenuItem) localObject);
		localJMenu1.addSeparator();

		localJMenu2 = createMenu(LocaleStrings.getString("F_117_JVM"), null, ' ', null);
		m_menustatusbar_text.put("GUI Languages", LocaleStrings.getString("F_118_JVM"));
		this.m_menu.put("GUI Languages", localJMenu2);

		localButtonGroup1 = new ButtonGroup();
		String str = null;

		String[] arrayOfString = JViewer.getSupportedLocales();

		for (int i = 0; i < arrayOfString.length; i++) {
			str = getLocaleCode(arrayOfString[i]);
			localObject = createRadioButtonMenu(arrayOfString[i], "Locale" + str,
					LocaleStrings.getString("F_119_JVM") + arrayOfString[i]);
			localButtonGroup1.add((AbstractButton) localObject);
			localJMenu2.add((JMenuItem) localObject);
		}

		notifyMenuStateSelected("Locale" + JViewer.getLanguage(), true);
		localJMenu1.add(localJMenu2);
		return localJMenu1;
	}

	protected JMenu constructDeviceRedirMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_64_JVM"), "Media", 'd',
				LocaleStrings.getString("F_65_JVM"));

		JMenuItem localJMenuItem = createMenuItem(LocaleStrings.getString("F_66_JVM"), 'V', "DeviceMediaDialog",
				LocaleStrings.getString("F_65_JVM"));
		localJMenu.add(localJMenuItem);

		return localJMenu;
	}

	protected JMenu constructHelpMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_67_JVM"), "HelpAboutJViewer", 'H',
				LocaleStrings.getString("F_68_JVM"));

		JMenuItem localJMenuItem = createMenuItem(LocaleStrings.getString("F_69_JVM") + JViewer.getTitle(), ' ', 112, 2,
				"HelpAboutJViewer", LocaleStrings.getString("F_68_JVM"));
		localJMenu.add(localJMenuItem);

		return localJMenu;
	}

	protected JMenu constructKeyboardLayoutMenu() {
		JMenu localJMenu1 = createMenu(LocaleStrings.getString("F_70_JVM"), "Keyboard Layout", 'L',
				LocaleStrings.getString("F_71_JVM"));

		Object localObject = createCheckBoxMenuItem(LocaleStrings.getString("F_72_JVM"), ' ', "Auto detect",
				LocaleStrings.getString("F_73_JVM"));
		localJMenu1.add((JMenuItem) localObject);

		JMenu localJMenu2 = createMenu(LocaleStrings.getString("F_115_JVM"), null, ' ', null);
		this.m_menu.put("PhysicalKeyboard", localJMenu2);
		m_menustatusbar_text.put("PhysicalKeyboard", LocaleStrings.getString("F_115_JVM"));
		ButtonGroup localButtonGroup = new ButtonGroup();
		if (INITIAL_MENU_STATUS) {
			m_menuItems_setenabled.put("PhysicalKeyboard", Boolean.valueOf(true));
		}

		JMenu localJMenu3 = createMenu(LocaleStrings.getString("F_147_JVM"), " ", ' ',
				LocaleStrings.getString("F_148_JVM"));

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_143_JVM"), "Windows host",
				LocaleStrings.getString("F_145_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu3.add((Component) localObject);
		((JMenuItem) localObject).setSelected(true);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_144_JVM"), "Linux host",
				LocaleStrings.getString("F_146_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu3.add((Component) localObject);
		localJMenu2.add(localJMenu3);
		localJMenu2.addSeparator();

		localButtonGroup = new ButtonGroup();

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_77_JVM"), "US",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_77_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_78_JVM"), "GB",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_78_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_80_JVM"), "FR",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_80_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_90_JVM"), "FR-BE",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_90_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_81_JVM"), "DE",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_81_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_85_JVM"), "DE-CH",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_85_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_93_JVM"), "JP",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_93_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_79_JVM"), "ES",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_79_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_82_JVM"), "IT",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_82_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_83_JVM"), "DA",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_83_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_84_JVM"), "FI",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_84_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_86_JVM"), "NO",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_86_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_87_JVM"), "PT",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_87_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_88_JVM"), "SV",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_88_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_142_JVM"), "NL-NL",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_142_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_91_JVM"), "NL-BE",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_91_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_94_JVM"), "TR_F",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_94_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_95_JVM"), "TR_Q",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_95_JVM")
						+ LocaleStrings.getString("F_116_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu("NONE", "NONE", "NONE");
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu1.add(localJMenu2);

		localJMenu2 = createMenu(LocaleStrings.getString("F_74_JVM"), null, ' ', null);
		this.m_menu.put("SoftKeyboard", localJMenu2);
		m_menustatusbar_text.put("SoftKeyboard", LocaleStrings.getString("F_74_JVM"));
		localButtonGroup = new ButtonGroup();
		if (INITIAL_MENU_STATUS) {
			m_menuItems_setenabled.put("SoftKeyboard", Boolean.valueOf(true));
		}

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_77_JVM"), "SKBD_English(United States)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_77_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_78_JVM"), "SKBD_English(United Kingdom)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_78_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_79_JVM"), "SKBD_Spanish",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_79_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_80_JVM"), "SKBD_French",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_80_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_81_JVM"), "SKBD_German(Germany)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_81_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_82_JVM"), "SKBD_Italian",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_82_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_83_JVM"), "SKBD_Danish",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_83_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_84_JVM"), "SKBD_Finnish",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_84_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_85_JVM"), "SKBD_German(Switzerland)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_85_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_86_JVM"), "SKBD_Norwegian(Norway)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_86_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_87_JVM"), "SKBD_Portuguese(Portugal)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_87_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_88_JVM"), "SKBD_Swedish",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_88_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_89_JVM"), "SKBD_Hebrew",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_89_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_90_JVM"), "SKBD_French(Belgium)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_90_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_142_JVM"), "SKBD_Dutch(Netherlands)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_142_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_91_JVM"), "SKBD_Dutch(Belgium)",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_91_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_92_JVM"), "SKBD_Russian",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_92_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_139_JVM"), "SKBD_Japanese - Q",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_139_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_140_JVM"), "SKBD_Japanese Hiragana",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_140_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_141_JVM"), "SKBD_Japanese Katakana",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_141_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_94_JVM"), "SKBD_Turkish - F",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_94_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localObject = createRadioButtonMenu(LocaleStrings.getString("F_95_JVM"), "SKBD_Turkish - Q",
				LocaleStrings.getString("F_75_JVM") + LocaleStrings.getString("F_95_JVM")
						+ LocaleStrings.getString("F_76_JVM"));
		localButtonGroup.add((AbstractButton) localObject);
		localJMenu2.add((JMenuItem) localObject);

		localJMenu1.add(localJMenu2);
		return localJMenu1;
	}

	protected JMenu constructVideoRecordMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_96_JVM"), "VideoRecord", 'i',
				LocaleStrings.getString("F_97_JVM"));

		JMenuItem localJMenuItem = createMenuItem(LocaleStrings.getString("F_98_JVM"), ' ', "VideoRecordStart",
				LocaleStrings.getString("F_99_JVM"), true);
		localJMenu.add(localJMenuItem);

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_100_JVM"), ' ', "VideoRecordStop",
				LocaleStrings.getString("F_101_JVM"), false);
		localJMenu.add(localJMenuItem);
		localJMenu.addSeparator();

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_102_JVM"), ' ', "VideoRecordSettings",
				LocaleStrings.getString("F_103_JVM"));
		localJMenu.add(localJMenuItem);
		return localJMenu;
	}

	protected JMenu constructPowerMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_104_JVM"), "Power", 'w',
				LocaleStrings.getString("F_105_JVM"));

		JMenuItem localJMenuItem = createMenuItem(LocaleStrings.getString("F_106_JVM"), ' ', "Reset Server",
				LocaleStrings.getString("F_106_JVM"));
		localJMenu.add(localJMenuItem);

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_107_JVM"), ' ', "Immediate Shutdown",
				LocaleStrings.getString("F_107_JVM"));
		localJMenu.add(localJMenuItem);

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_108_JVM"), ' ', "Orderly Shutdown",
				LocaleStrings.getString("F_108_JVM"));
		localJMenu.add(localJMenuItem);

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_109_JVM"), ' ', "Power On Server",
				LocaleStrings.getString("F_109_JVM"));
		localJMenu.add(localJMenuItem);

		localJMenuItem = createMenuItem(LocaleStrings.getString("F_110_JVM"), ' ', "Power Cycle Server",
				LocaleStrings.getString("F_110_JVM"));
		localJMenu.add(localJMenuItem);

		return localJMenu;
	}

	protected JMenu constructUserMenu() {
		JMenu localJMenu = createMenu(LocaleStrings.getString("F_111_JVM"), "Active Users", 'A',
				LocaleStrings.getString("F_112_JVM"));

		int i = KVMClient.getNumUsers();
		String[] arrayOfString = KVMClient.getUserData();
		if ((arrayOfString != null) && (i != 0)) {

			for (int j = 0; j < i; j++) {
				ImageIcon localImageIcon = null;
				String str1 = arrayOfString[j].substring(arrayOfString[j].indexOf(":") + 1, arrayOfString[j].length())
						.trim();
				String str2 = arrayOfString[j].substring(0, arrayOfString[j].indexOf(":") - 1).trim();
				if (Integer.parseInt(str2) == JViewerApp.getInstance().getCurrentSessionId()) {
					URL localURL = JViewer.class.getResource("res/green.png");
					if (localURL != null)
						localImageIcon = new ImageIcon(localURL);
				}
				localJMenu.add(new JMenuItem(str1, localImageIcon));
			}
		}
		return localJMenu;
	}

	public JMenuItem createCustomActiveuserMenuItem(final int paramInt, String paramString, Icon paramIcon) {
		JMenuItem localJMenuItem = null;
		if (KVMSharing.KVM_REQ_GIVEN == 0) {
			localJMenuItem = new JMenuItem(paramString + "           ", paramIcon);
		} else
			localJMenuItem = new JMenuItem(paramString, paramIcon);
		localJMenuItem.setLayout(new FlowLayout(2, 5, 0));

		if ((KVMSharing.KVM_REQ_GIVEN == 0) && (paramIcon == null)) {

			URL localURL = JViewer.class.getResource("res/error.png");
			ImageIcon localImageIcon1 = new ImageIcon(localURL);
			Image localImage1 = localImageIcon1.getImage();
			Image localImage2 = localImage1.getScaledInstance(15, 15, 4);
			ImageIcon localImageIcon2 = new ImageIcon(localImage2);

			JButton localJButton = new JButton(localImageIcon2);
			localJButton.setToolTipText(LocaleStrings.getString("H_19_KVMS"));
			localJButton.setMargin(new Insets(0, 2, 0, 2));
			localJButton.setBorder(null);
			localJMenuItem.add(localJButton);

			localJButton.addMouseListener(new MouseAdapter() {
				public void mousePressed(MouseEvent paramAnonymousMouseEvent) {
					JViewerApp.getInstance().OnTerminateActiveuser(paramInt);
				}
			});
		}

		return localJMenuItem;
	}

	public void updateUserMenu() {
		if (getMenu("Active Users") == null)
			return;
		JMenu localJMenu = JViewerApp.getInstance().getM_frame().getMenu().getMenu("Active Users");
		localJMenu.removeAll();
		int i = KVMClient.getNumUsers();
		String[] arrayOfString = KVMClient.getUserData();

		for (int j = 0; j < i; j++) {
			ImageIcon localImageIcon = null;
			String str1 = arrayOfString[j].substring(arrayOfString[j].indexOf(":") + 1, arrayOfString[j].length())
					.trim();
			String str2 = arrayOfString[j].substring(0, arrayOfString[j].indexOf(":") - 1).trim();
			if (Integer.parseInt(str2) == JViewerApp.getInstance().getCurrentSessionId()) {
				URL localURL = JViewer.class.getResource("res/green.png");
				if (localURL != null) {
					localImageIcon = new ImageIcon(localURL);
				}
			}
			localJMenu.add(createCustomActiveuserMenuItem(Integer.parseInt(str2), str1, localImageIcon));
		}
	}

	protected void enableMenuMnemonics(boolean paramBoolean) {
		Set localSet = menuMnemonics.entrySet();
		Iterator localIterator = localSet.iterator();

		String str = null;

		while (localIterator.hasNext()) {
			Map.Entry localEntry = (Map.Entry) localIterator.next();
			str = (String) localEntry.getKey();
			Character localCharacter = (Character) localEntry.getValue();
			if (paramBoolean) {
				if (getMenu(str) != null) {
					getMenu(str).setMnemonic('\000');
				} else if (getMenuItem(str) != null) {
					getMenuItem(str).setMnemonic('\000');
				}
			} else if (getMenu(str) != null) {
				getMenu(str).setMnemonic(localCharacter.charValue());
			} else if (getMenuItem(str) != null) {
				getMenuItem(str).setMnemonic(localCharacter.charValue());
			}
		}
	}

	protected void enableMenuAccelerator(boolean paramBoolean) {
		Set localSet = menuAccelerator.entrySet();
		Iterator localIterator = localSet.iterator();

		while (localIterator.hasNext()) {
			Map.Entry localEntry = (Map.Entry) localIterator.next();
			String str = (String) localEntry.getKey();
			KeyStroke localKeyStroke = (KeyStroke) localEntry.getValue();
			if (paramBoolean) {
				if (getMenuItem(str) != null) {
					getMenuItem(str).setAccelerator(null);
				}
			} else if (getMenuItem(str) != null) {
				getMenuItem(str).setAccelerator(localKeyStroke);
			}
		}
	}

	protected JLabel constructZoomLabelText() {
		this.label_Text = new JLabel(LocaleStrings.getString("F_113_JVM") + "100%");
		return this.label_Text;
	}

	protected void addFullPermissionMenuItem() {
		if (getMenuItem("RequestFullPermission") == null) {
			JMenu localJMenu = getMenu("Options");
			JMenuItem localJMenuItem = createMenuItem(LocaleStrings.getString("F_132_JVM"), ' ',
					"RequestFullPermission", LocaleStrings.getString("F_133_JVM"));
			localJMenu.add(localJMenuItem);
		}
	}

	public void removeFullPermissionMenuItem() {
		JViewerApp localJViewerApp = JViewerApp.getInstance();

		if (getMenuItem("RequestFullPermission") != null) {
			JMenuItem localJMenuItem = getMenuItem("RequestFullPermission");
			getMenu("Options").remove(localJMenuItem);
			this.m_menuItems.remove("RequestFullPermission");
		}
		localJViewerApp.setFullPermissionRequest(false);
	}

	protected void addBlockPermissionMenuItem() {
		if (getMenuItem("BlockFullPermission") == null) {
			JMenu localJMenu = getMenu("Options");
			JCheckBoxMenuItem localJCheckBoxMenuItem = createCheckBoxMenuItem(LocaleStrings.getString("F_149_JVM"), ' ',
					"BlockFullPermission", LocaleStrings.getString("F_150_JVM"));
			localJMenu.add(localJCheckBoxMenuItem);
		}
	}

	public void removeBlockPermissionMenuItem() {
		JViewerApp localJViewerApp = JViewerApp.getInstance();

		if (getMenuItem("BlockFullPermission") != null) {
			JMenuItem localJMenuItem = getMenuItem("BlockFullPermission");
			getMenu("Options").remove(localJMenuItem);
			this.m_menuItems.remove("BlockFullPermission");
		}
	}

	public void setZoomLabelText(String paramString) {
		this.label_Text.setText(LocaleStrings.getString("F_113_JVM") + paramString);
	}

	public Hashtable<String, JMenuItem> getM_menuItems() {
		return this.m_menuItems;
	}

	public void setM_menuItems(Hashtable<String, JMenuItem> paramHashtable) {
		this.m_menuItems = paramHashtable;
	}

	protected JLabel constructString() {
		this.menu_string = null;
		this.menu_string = new JLabel();
		this.menu_string.setVisible(true);
		return this.menu_string;
	}

	protected int RemoveString() {
		this.menu_string = null;
		return 0;
	}

	public Hashtable<String, JMenu> getM_menu() {
		return this.m_menu;
	}

	public void setM_menu(Hashtable<String, JMenu> paramHashtable) {
		this.m_menu = paramHashtable;
	}

	public static Hashtable<String, Character> getMenuMnemonics() {
		return menuMnemonics;
	}

	public static Hashtable<String, KeyStroke> getMenuAccelerator() {
		return menuAccelerator;
	}

	public JMenu getMacroSubMenu() {
		return this.macroSubMenu;
	}

	public void setMacroSubMenu(JMenu paramJMenu) {
		this.macroSubMenu = paramJMenu;
	}

	public static int getComponentIndex(Component paramComponent) {
		int i = -1;
		Container localContainer = null;
		if ((paramComponent != null) && ((localContainer = paramComponent.getParent()) != null))
			for (i = 0; i < localContainer.getComponentCount();) {
				if (localContainer.getComponent(i) == paramComponent) {
					return i;
				}
				i++;
				// tianlin
				Debug.out.println("getComponentIndex() : component/component.getParent() is null");
				continue;
//				Debug.out.println("getComponentIndex() : component/component.getParent() is null");

			}
		return i;
	}

	private String getLocaleCode(String paramString) {
		String str1 = " - [";
		int i = paramString.indexOf(str1) + str1.length();
		int j = paramString.indexOf("]");
		String str2 = paramString.substring(i, j);
		return str2;
	}
}

/*
 * Location:
 * D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\kvm\jviewer\gui\JVMenu.class
 * Java compiler version: 5 (49.0) JD-Core Version: 0.7.1
 */